/** layuiAdmin.std-v1.0.0 LPPL License By http://www.layui.com/admin/ */;


layui.define(function (e) {
    var $ = layui.$;

    var blockIndex = 0;
    $.ajaxSetup({
        beforeSend: function (a, b, c) {
            blockIndex = layer.load(1, { shade: 0.6 });
        },
        error: function (xhr, status, error) {
            layer.msg(error, { icon: 2, time: 3000 });
        },
        complete: function () {
            if (blockIndex) {
                layer.close(blockIndex);
            }
        }
    });

    var i = (layui.$, layui.layer, layui.laytpl, layui.setter, layui.view, layui.admin);
    i.events.logout = function () {
        i.req({
            url: "/admin/login/logout",
            type: "get",
            data: {},
            done: function (e) {
                i.exit(function () {
                    location.href = "admin/login"
                })
            }
        })
    }
    
    e("common", {});
});